package com.haizhi.gradletest;

import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;

import com.google.gson.Gson;

public class MainActivity extends ActionBarActivity {
    private Gson gson = new Gson();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ApplicationInfo info= null;
        try{
            info = getApplication().getPackageManager().getApplicationInfo(getPackageName(),PackageManager.GET_META_DATA);
            int msg = info.metaData.getInt("env_net");
            Log.e("chenlong","msg = "+msg);

        }catch (PackageManager.NameNotFoundException e){

        }

    }


}
